//author:kakake
interface WPMT_DoctorEvaluation_Model {
    "ID": number,
    "RecordId": number,
    "OrderNo": string,
    "MPUserId": string,
    "EmpId": number,
    "PatientId": number,
    "Satisfaction": string,
    "EvaluateContent": string,
    "Status": number,
    "EvaluateTime": string,
    "OperateTime": string,
    "ReplyContent": string,
    "ReplyTime": string,
    "ReplyEmpId": number,
    "DocName":string,
    "PatName":string,
    "WorkId": number
}

class WPMT_DoctorEvaluation_ORM {
    public data = {
        dbConn: TSLobsterAPI.Program.GetDbConn(),
        WorkId: 1
    }

    constructor(workid: number) {
        this.data.WorkId = workid;
        this.WPMT_DoctorEvaluation.WorkId = workid;
    }

    public WPMT_DoctorEvaluation = {
        "model": {
            "ID": 0,
            "RecordId": 0,
            "OrderNo": "",
            "MPUserId": "",
            "EmpId": 0,
            "PatientId": 0,
            "Satisfaction": "",
            "EvaluateContent": "",
            "Status": 0,
            "EvaluateTime": "yyyy-MM-dd",
            "OperateTime": "yyyy-MM-dd",
            "WorkId": 0,
            "ReplyContent": "",
            "ReplyTime": "yyyy-MM-dd",
            "ReplyEmpId": 0,
            "DocName":"",
            "PatName":""
        },
        "tablename": "WPMT_DoctorEvaluation",
        "key": "ID",
        "val": "0",
        "objval": {},
        "query": {},
        "where": "",
        "pageinfo": {},
        "WorkId": 1
    }

    Save(model: WPMT_DoctorEvaluation_Model): any {
        this.WPMT_DoctorEvaluation.objval = model;
        return TSLobsterAPI.DbHelper.SaveModel(this.data.dbConn, this.WPMT_DoctorEvaluation);
    }

    GetList(where?: string) {
        return TSLobsterAPI.OrmMsSql.GetListModel(this.data.dbConn, this.WPMT_DoctorEvaluation);
    }
}
